python concat list to sql query string

45

l = [1, 5, 8]
sql_query = 'select name from studens where id in (' + ','.join(map(str, l)) + ')'

Comments

Submit
0 Comments